In modern video codecs, such as H.264 (ITU-TRec. H.264/ISO/IEC MPEG 14496-10, 2003), intra prediction is performed by extrapolation of decoded pixel values (on the border of the block) according to fixed directions. In the patent publication U.S. Pat. No. 7,120,196, it is proposed that a reference vector (or motion vector) can be used for infra prediction. The application of a reference vector for infra prediction can be described by following equation.P(i,j)=R(y+i+my,x+j+mx)  Equation 1
Where P is the predicted block, R is previously reconstructed pixels, (y,x) is the picture coordinates of the top left corner of the predicted block where (0,0) is top left corner of the picture, (i,j) is the coordinates within the predicted block where (0,0) is in the top left corner and (I-1,J-1) is the bottom right corner, (my,mx) is the reference vector. The portion of R pointed out by the reference vector is denoted reference block.
For the pixels that are not yet decoded (for example the ones in the current block) it is said that these can be assigned a pixel value of 0 or 128. In the prior art document “S. -L Yu and C. Chrysafis, New Infra Prediction using Intra-Macroblock Motion Compensation, JVT meeting Fairfax, do c JVT-C151, May 2002.”, two other techniques for assigning values to not yet encoded pixels are mentioned, pixel replication and symmetric extension.
Sub-pixel displacement is also possible by using a filter. process in combination with Equation 1, see below.
                              P          ⁡                      (                          i              ,              j                        )                          =                              ∑                          k              =              0                                      K              -              1                                ⁢                                          ⁢                                    ∑                              l                =                0                                            L                -                1                                      ⁢                                                  ⁢                                          F                ⁡                                  (                                                            i                      +                      k                      -                                              K                        /                        2                                                              ,                                          j                      +                      l                      -                                              L                        /                        2                                                                              )                                            ⁢                              R                ⁡                                  (                                                            y                      +                      i                      +                                              m                        y                                                              ,                                          x                      +                      j                      +                                              m                        x                                                                              )                                                                                        Equation        ⁢                                  ⁢        2            
Where F(k,l) is a filter coefficient of a 2D non-separable interpolation filter to obtain pixel values in-between pixel values in R. The filtering can also be achieved by separable filtering in horizontal and vertical direction as in H.264.
For the case of infra prediction according to H.264 below describe the horizontal prediction mode:P(i,j)=R(y+i,x−1)  Equation 3
Also for some of the directional extrapolation modes according to H.264 a filtering process is applied on the previously decoded pixel values before application of Equation 3.
It can also be noted that Equation 1 and Equation 2 also are valid for inter prediction in video coding, e.g. prediction from a decoded frame from another time instant than the current frame.
In an encoder the prediction mode (intra or inter) is entropy coded. The prediction block (inter or intra) is removed from the pixel values of an original block to obtain the prediction error block. The prediction error block is then transformed by for example DCT(Discrete Co sinus Transform) and the transform coefficients are quantized and entropy coded.
In the decoder the prediction mode is decoded. A prediction block is generated by for example applying Equation 3. The prediction error block is obtained after entropy decoding, inverse quantization and inverse transformation. The prediction error block is then added to the prediction block to obtain a reconstructed block.
In view of the prior art, there is a need for a more reliable and accurate method for prediction of pixel values in images.